A digital image generally refers to an image captured, for example, by an apparatus such as digital camera and scan, and obtained by synthesizing any non-image data, for example, with a mathematical function, etc. Typically a digital image captured by an apparatus such as digital camera and scan may be subjected to twisting, inclination or other deformation, so it is necessary to process the image using some image processing technologies so as to correct distortion or deformation thereof.
Particularly in some image processing technologies, for example, processing performed on an image captured for a document, it is typically necessary to perform some processing such as restoration and compensation dependent upon corners of the document in the captured image, and in these image processing technologies, an improved effect of image processing will be facilitated if the accuracy of the extracted document corners can be improved.